package com.youcheng.utils;

public class MyException extends RuntimeException{

    private String message;
    private int code;

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public static MyException commonReturn(int errorCode,String errorMessage){
        MyException myException = new MyException();
        myException.setCode(errorCode);
        myException.setMessage(errorMessage);
        return myException;
    }

}
